package com.example.test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer2 {

    Logger logger = LoggerFactory.getLogger(getClass());


    @KafkaListener(topics = {"${kafka.test.topic}"}, groupId = "xiaofeng2")
    public void consumer(String message) {
        logger.info("groupId = xiaofeng2, message = " + message);
    }

}
